<?php
/**
 * 文章分类列表模板
 */
use common\widgets\ActiveForm;
use common\widgets\FormTable;

$form = ActiveForm::begin();

echo FormTable::widget([
    'model' => $model,
    'form' => $form,
    'rows' => [
        'parentID' => ['type' => FormTable::INPUT_WIDGET,
            'widgetClass' => 'common\widgets\SelectTree',
            'options' => [
                'pluginOptions' => [
                    'data' => \common\models\DAO\ProductType::find()->asArray()->all(),
                    'columnPid' => 'parentID',
                    'columnName' => 'typeName',
                    'initValue' => '--请选择分类--',
//                    'isDisabled' => true,
                ]
            ]
        ],
        'typeName' => ['type' => FormTable::INPUT_TEXT],
    ]
]);

ActiveForm::end();